<?php
$uploaddir = "uploads/";
$file = basename($_FILES['uploadedfile']['name']);
$uploadfile = $uploaddir . $file;
echo "file=".$file;
if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $uploadfile))
 {
    echo $file;
}
else {
    echo "error";
}
?>